package xyz.jcat.common.util;

public class StringUtils extends org.apache.commons.lang3.StringUtils {

    public static String replaceLast(final String text, final String searchString, final String replacement) {
        if (isEmpty(text) || isEmpty(searchString) || replacement == null || !text.endsWith(searchString)) {
            return text;
        }
        return text.substring(0, text.length()-searchString.length());
    }

}
